package com.climb.ssm.service.impl;

import com.climb.ssm.dao.AccountDao;
import com.climb.ssm.service.AccountService;

import java.util.*;


/**
 * @author Administrator
 * 使用spring-ioc方法去实现
 */
public class AccountServiceImplByISpIoc implements AccountService {

	/*sping-ioc去注入*/
//    AccountDao accountDao;
	private String name;
	private Integer age;
	// Bean对象
	private Date birthday;
	private AccountDao accountDao ;
	// 集合类型
	private String[] arrs;
	private List<String> list;

	public AccountServiceImplByISpIoc(int i) {
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public void setAccountDao(AccountDao accountDao) {
		this.accountDao = accountDao;
	}

	public void setArrs(String[] arrs) {
		this.arrs = arrs;
	}

	public void setList(List<String> list) {
		this.list = list;
	}
/*可以识别setset，忽略大小写*/
	public void setSet(Set<String> set) {
		this.set = set;
	}

	public void setMap1(Map<String, String> map) {
		this.map = map;
	}

	public void setProperties(Properties properties) {
		this.properties = properties;
	}

	private Set<String> set;
	private Map<String,String> map;
	private Properties properties;
	public AccountServiceImplByISpIoc(){
		System.out.println("对象创建了");
	}
	@Override
	public void saveAccount(){
		accountDao.saveAccount();
	}


	/*检验生命周期*/
	public void init(){
		System.out.println("对象初始化了");
	}
	public void destroy(){
		System.out.println("对象销毁了");
	}
}

